resource "google_pubsub_topic" "default-telemetry" {
  name = "<%= ctx[:vars]['cloudiot_device_telemetry_topic_name'] %>"
}

resource "google_cloudiot_registry" "<%= ctx[:primary_resource_id] %>" {
  name     = "<%= ctx[:vars]['cloudiot_registry_name'] %>"

  event_notification_configs {
    pubsub_topic_name = google_pubsub_topic.default-telemetry.id
    subfolder_matches = ""
  }

}
